﻿

using Maticsoft.BLL;
using Maticsoft.Model;

using System;
using System.Collections.Specialized;
using System.Web.UI.HtmlControls;

public partial class WebPage_SheZhi_Zhifu : SystemBBasePage
{
    public NameValueCollection _system = new NameValueCollection();
    protected string alipay_acc = "";
    protected string alipay_mid = "";
    protected string alipay_sec = "";
    protected string bill_mid = "";
    protected string bill_sec = "";
    protected string chinabank_mid = "";
    protected string chinabank_sec = "";

    protected string paypal_mid = "";
    protected string paypal_sec = "";

    public SystemConfig sysmodel = new SystemConfig();
    private Maticsoft.BLL.System systems = new Maticsoft.BLL.System();
    protected string tenpay_mid = "";
    protected string tenpay_sec = "";
    protected string yeepay_mid = "";
    protected string yeepay_sec = "";

    private void getZhifu()
    {
        Maticsoft.Model.System model = new Maticsoft.Model.System();
        model = this.systems.GetModel(1);
        this.alipay_mid = model.alipaymid;
        this.alipay_sec = model.Alipaysec;
        this.alipay_acc = model.alipayacc;
        this.yeepay_mid = model.yeepaymid;
        this.yeepay_sec = model.yeepaysec;
        this.chinabank_mid = model.chinabankmid;
        this.chinabank_sec = model.chinabanksec;
        this.tenpay_mid = model.tenpaymid;
        this.tenpay_sec = model.tenpaysec;
    }

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        this.HeaderControl1.Select = "shezhi";
        this._system = this.sysmodel.GetSystem();
        if (base.Request.HttpMethod == "POST")
        {
            this.setZhifu();
        }
        this.getZhifu();
    }

    private void setZhifu()
    {
        Maticsoft.Model.System model = new Maticsoft.Model.System();
        model = this.systems.GetModel(1);
        model.alipaymid = base.Request.Form["alipay_mid"].ToString().Trim();
        model.Alipaysec = base.Request.Form["alipay_sec"].ToString().Trim();
        model.alipayacc = base.Request.Form["alipay_acc"].ToString().Trim();
        model.yeepaymid = base.Request.Form["yeepay_mid"].ToString().Trim();
        model.yeepaysec = base.Request.Form["yeepay_sec"].ToString().Trim();
        model.chinabankmid = base.Request.Form["chinabank_mid"].ToString().Trim();
        model.chinabanksec = base.Request.Form["chinabank_sec"].ToString().Trim();
        model.tenpaymid = base.Request.Form["tenpay_mid"].ToString().Trim();
        model.tenpaysec = base.Request.Form["tenpay_sec"].ToString().Trim();
        this._system = new NameValueCollection();
        this._system.Add("alipay_anti_phishing", base.Request["alipay_anti_phishing"]);
        this._system.Add("alipay_SecuredTransactions", base.Request["alipay_SecuredTransactions"]);
        this._system.Add("alipay_Manual_SecuredTransactions", base.Request["alipay_Manual_SecuredTransactions"]);
        this.sysmodel.CreateSystemByNameCollection(this._system);
        this.systems.Update(model);
        base.SetSuccess("设置成功");
    }
}


